package cn.zktr.Personnel.model.pojos;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the per_pms_z_jnxx database table.
 * 
 */
@Entity
@Table(name="per_pms_z_jnxx")
@NamedQuery(name="PerPmsZJnxx.findAll", query="SELECT p FROM PerPmsZJnxx p")
public class PerPmsZJnxx implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	private int jnxxid;

	private String jnxxname;

	//bi-directional many-to-one association to PerPmsJYgjn
	@OneToMany(mappedBy="perPmsZJnxx")
	private List<PerPmsJYgjn> perPmsJYgjns;

	//bi-directional many-to-one association to PerPmsZCls
	@ManyToOne
	@JoinColumn(name="CLSID")
	private PerPmsZCls perPmsZCl;

	//bi-directional many-to-one association to PerRetWAlt
	@OneToMany(mappedBy="perPmsZJnxx")
	private List<PerRetWAlt> perRetWAlts;

	//bi-directional many-to-one association to PerTngRus
	@OneToMany(mappedBy="perPmsZJnxx")
	private List<PerTngRus> perTngRuses;

	public PerPmsZJnxx() {
	}

	public int getJnxxid() {
		return this.jnxxid;
	}

	public void setJnxxid(int jnxxid) {
		this.jnxxid = jnxxid;
	}

	public String getJnxxname() {
		return this.jnxxname;
	}

	public void setJnxxname(String jnxxname) {
		this.jnxxname = jnxxname;
	}

	public List<PerPmsJYgjn> getPerPmsJYgjns() {
		return this.perPmsJYgjns;
	}

	public void setPerPmsJYgjns(List<PerPmsJYgjn> perPmsJYgjns) {
		this.perPmsJYgjns = perPmsJYgjns;
	}

	public PerPmsJYgjn addPerPmsJYgjn(PerPmsJYgjn perPmsJYgjn) {
		getPerPmsJYgjns().add(perPmsJYgjn);
		perPmsJYgjn.setPerPmsZJnxx(this);

		return perPmsJYgjn;
	}

	public PerPmsJYgjn removePerPmsJYgjn(PerPmsJYgjn perPmsJYgjn) {
		getPerPmsJYgjns().remove(perPmsJYgjn);
		perPmsJYgjn.setPerPmsZJnxx(null);

		return perPmsJYgjn;
	}

	public PerPmsZCls getPerPmsZCl() {
		return this.perPmsZCl;
	}

	public void setPerPmsZCl(PerPmsZCls perPmsZCl) {
		this.perPmsZCl = perPmsZCl;
	}

	public List<PerRetWAlt> getPerRetWAlts() {
		return this.perRetWAlts;
	}

	public void setPerRetWAlts(List<PerRetWAlt> perRetWAlts) {
		this.perRetWAlts = perRetWAlts;
	}

	public PerRetWAlt addPerRetWAlt(PerRetWAlt perRetWAlt) {
		getPerRetWAlts().add(perRetWAlt);
		perRetWAlt.setPerPmsZJnxx(this);

		return perRetWAlt;
	}

	public PerRetWAlt removePerRetWAlt(PerRetWAlt perRetWAlt) {
		getPerRetWAlts().remove(perRetWAlt);
		perRetWAlt.setPerPmsZJnxx(null);

		return perRetWAlt;
	}

	public List<PerTngRus> getPerTngRuses() {
		return this.perTngRuses;
	}

	public void setPerTngRuses(List<PerTngRus> perTngRuses) {
		this.perTngRuses = perTngRuses;
	}

	public PerTngRus addPerTngRus(PerTngRus perTngRus) {
		getPerTngRuses().add(perTngRus);
		perTngRus.setPerPmsZJnxx(this);

		return perTngRus;
	}

	public PerTngRus removePerTngRus(PerTngRus perTngRus) {
		getPerTngRuses().remove(perTngRus);
		perTngRus.setPerPmsZJnxx(null);

		return perTngRus;
	}

}